package com.cm.hello.service;

import com.cm.autumn.annotation.Autowired;
import com.cm.autumn.annotation.Component;
import jakarta.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author cm
 * 2025/2/6
 */
@Component
public class DbInitializer {
    final Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    UserService userService;

    @PostConstruct
    void init() {
        logger.info("init database...");
        userService.initDb();
    }
}
